let skus = [{
    "id": 1, specJson: { "Weight": "W1", "CBM": "C1" },
}, {
    "id": 2, specJson: { "Weight": "W1", "CBM": "C2" },
}, {
    "id": 3, specJson: { "Weight": "W2", "CBM": "C1" },
}, {
    "id": 4, specJson: { "Weight": "W2", "CBM": "C3" },
}, {
    "id": 5, specJson: { "Weight": "W2", "CBM": "C3" },
}]

//之前根据skus生成的specList
let specList = [{
    name: "Weight",
    selectedOption: "",
    options: ["W1", 'W2']
},
{
    name: "CBM",
    selectedOption: "",
    options: ["C1", 'C2', 'C3']
}]

//当specList某一项的selectedOption有值时，根据skus的数据，筛选出其余有值的项

function filterSpecList() {
    //实现此函数
}

//当
specList[0].selectedOption = 'W1'
//调用
filterSpecList()
/**
specList变成:
  [{
    name: "Weight",
    selectedOption: "W1",
    options:["W1", 'W2']
},
{
    name: "CBM",
    selectedOption: "",
    options: ["C1", 'C2']
}]
*/


//当
specList[1].selectedOption = 'C3'
//调用
filterSpecList()
        /**
specList变成:
  [{
    name: "Weight",
    selectedOption: "",
    options: ['W2']
},
{
    name: "CBM",
    selectedOption: "C3",
    options: ["C1", 'C2','C3']
}]
*/
